import React, { Component } from 'react'
import './style.css'
import { string, func } from 'prop-types'

class WuIcon extends Component {
  render() {
    const { type, onClick } = this.props
    return <div className={`iconfont ${type}`} onClick={onClick}></div>
  }
}

// 入参校验
WuIcon.propTypes = {
  type: string.isRequired,
  onClick: func
}

// 默认值
WuIcon.defaultProps = {
  onClick: () => {}
}

export default WuIcon
